import request from '@/utils/request'

export function list(parameter) {
  return request({
    url: '/SYDangerCheckTaskDetail/GetPageData',
    method: 'get',
    params: parameter
  })
}

export function FormulateAgainAssing(data) {
    return request({
      url: '/SYDangerCheckTaskDetail/FormulateAgainAssing',
      method: 'post',
      data
    })
  }
  
  export function saveCheckTaskTemplateDetails(data,saveOp,companyCode) {
    return request({
      url: `/SYDangerCheckTaskDetail/SaveCheckTaskTemplateDetails?saveOp=${saveOp}&companyCode=${companyCode}`,
      method: 'post',
      data
    })
  }


  export function getDetailTemplateData(parameter) {
    return request({
      url: '/SYDangerCheckTaskDetail/GetDetailTemplateData',
      method: 'get',
      params: parameter
    })
  }


  
export function confirmAssign(data) {
  return request({
    url: '/SYDangerCheckTaskDetail/ConfirmAssign',
    method: 'post',
    data
  })
}

export function backAssign(data) {
  return request({
    url: '/SYDangerCheckTaskDetail/BackAssign',
    method: 'post',
    data
  })
}


export function SnapShotAdd(data,Submit) {
  return request({
    url: '/SYDangerCheckTaskDetail/SnapShotAdd?Submit='+Submit,
    method: 'post',
    data
  })
}

export function initNewEntity(parameter) {
  return request({
    url: '/SYDangerCheckTaskDetail/InitNewEntity',
    method: 'get',
    params: parameter
  })
}


export function getDangerDetail(parameter) {
  return request({
    url: '/SYDangerCheckTaskDetail/GetDetail',
    method: 'get',
    params: parameter
  })
}

export function handleDelete(parameter) {
  return request({
    url: '/SYDangerCheckTaskDetail/DeleteTaskDetail',
    method: 'get',
    params: parameter
  })
}

export function SaveHiddenDanger(data,Confirm) {
  return request({
    url: '/SYDangerCheckTaskDetail/SaveHiddenDanger?Confirm='+Confirm,
    method: 'post',
    data
  })
}


export function SaveDetail(data,Submit) {
  return request({
    url: '/SYDangerCheckTaskDetail/SaveDetail?Submit='+Submit,
    method: 'post',
    data
  })
}

export function handleAdd(parameter) {
  return request({
    url: '/SYDangerCheckTaskDetail/SubmitRecord',
    method: 'get',
    params: parameter
  })
}

export function SubmitRecords(data) {
  return request({
    url: '/SYDangerCheckTaskDetail/SubmitRecords',
    method: 'post',
    data
  })
}

export function getHiddenDangerPageData(parameter) {
  return request({
    url: '/SYDangerCheckTaskDetail/GetHiddenDangerPageData',
    method: 'get',
    params: parameter
  })
}


export function ConfirmVerify(data) {
  return request({
    url: '/SYDangerCheckTaskDetail/ConfirmVerify',
    method: 'post',
    data
  })
}

export function backVerify(data) {
  return request({
    url: '/SYDangerCheckTaskDetail/BackVerify',
    method: 'post',
    data
  })
}



export function confirmFormulate(data) {
  return request({
    url: '/SYDangerCheckTaskDetail/ConfirmFormulate',
    method: 'post',
    data
  })
}

export function backFormulate(data) {
  return request({
    url: '/SYDangerCheckTaskDetail/BackFormulate',
    method: 'post',
    data
  })
}

export function confirmCorrective(data) {
  return request({
    url: '/SYDangerCheckTaskDetail/ConfirmCorrective',
    method: 'post',
    data
  })
}


export function BackHiddenDanger(data) {
  return request({
    url: '/SYDangerCheckTaskDetail/BackHiddenDanger',
    method: 'post',
    data
  })
}

export function getCheckAreaDetailPageData(parameter) {
  return request({
      url: '/SYDangerCheckTaskDetail/GetCheckAreaDetailPageData',
      method: 'get',
      params: parameter
  })
}